﻿using System.Web.Mvc;

namespace Mvc.RazorTools.Charts.Morris
{
	/// <summary>
	/// Provides a set of extension methods for the System.Web.Mvc.HtmlHelper class. These extension
	/// methods are referenced in the razor view using the @Html keyword.
	/// </summary>
	public static class HtmlExtensions
	{
		/// <summary>
		/// Extension method to display a Razor Chart in a view.
		/// </summary>
		/// <param name="html">An instance of HtmlHelper.</param>
		/// <param name="chart">An instance of the chart to display.</param>
		/// <returns></returns>
		public static MvcHtmlString MorrisChart(this HtmlHelper html, RazorChart chart)
		{
			return chart.Html;
		}
	}
}
